package client;
import java.util.HashMap;
import java.util.Map;

public class ClientCache implements AbstractCache, Putable {

	Map<String, Object> storage = new HashMap<String, Object>();

	@Override
	public void put(String key, Object value) {
		storage.put(key, value);
	}

	@Override
	public Object get(String key) {
		storage.get(key);
		return null;
	}

	@Override
	public Object[] getAll() {
		Object[] keys=storage.keySet().toArray();
		Object[] o = new Object[storage.size()*2];
		for (int i = 0; i < storage.size(); i++) {
			o[2*i]=keys[i];
			o[2*i+1]=storage.get(keys[i]);
		}
		return o;
	}

}
